package service;

import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @description:
 * @author: jhy
 * @time: 2021/5/7 16:14
 */
@Service
public class UseDemoService {

    //根据类型自动注入demoService
    @Autowired
    DemoService demoService;

    public void sayHelloRpc(){
        System.out.println("RPC远程调用");
        String s = demoService.sayHello("RPC ");
        System.out.println(s);
    }
}
